﻿using System;
using Sharp.Infrastructure.Interfaces;

namespace Sharp.DataTransferObject
{
    public partial class MessageDTO : IDTO
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime PublishTime { get; set; }
        /// <summary>
        /// 发件人id
        /// </summary>
        public Guid? SenderId { get; set; }
        /// <summary>
        /// 收件人Id
        /// </summary>
        public Guid? ReceiverId { get; set; }
        /// <summary>
        /// 发件人
        /// </summary>
        public string SenderName { get; set; }  
        /// <summary>
        /// 发件人
        /// </summary>
        public MessageDTO.UserDTO Sender { get; set; }
        /// <summary>
        /// 收件人
        /// </summary>
        public string RecipientName { get; set; }
        /// <summary>
        /// 是否已读
        /// </summary>
        public bool IsReaded { get; set; }
        /// <summary>
        /// 阅读时间
        /// </summary>
        public DateTime? ReadedTime { get; set; }

        public class UserDTO
        {
            /// <summary>
            /// 获取或设置当前客户的用户名。
            /// </summary>
            public string UserName { get; set; }
            /// <summary>
            /// 头像
            /// </summary>
            public string Face { get; set; }
        }
    }
}
